/**
 * Copyright © 2011 Software in Life Inc. All rights reserved.
 */
package com.softwareinlife.snaf.user.service;

import java.util.logging.Logger;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.softwareinlife.snaf.user.dao.UserDao;
import com.softwareinlife.snaf.user.model.UserModel;

/**
 * <b>Service Component for Users</b>
 * 
 * <p>
 * Business Logic Component
 * </p>
 * 
 * @author Jang, Sun-Jin(jangsunjin@softwareinlife.com)
 */
@Service
public class UserService {

	/**
	 * Logger
	 */
	protected static Logger logger = Logger.getLogger("service");

	/**
	 * DAO
	 */
	@Autowired
	private UserDao dao;
	
	/**
	 * 
	 * @param model
	 */
	public void createModel(UserModel model) {
		dao.create(model);
	}

	/**
	 * Read Model
	 * 
	 * @param isbn
	 * @return model
	 */
	public UserModel readModel(String email) {
		return dao.read(email);
	}

	/**
	 * Update Model
	 * 
	 * @param isbn
	 * @param model
	 */
	public void updateModel(UserModel model) {
		dao.update(model);
	}

	/**
	 * Delete Model
	 * 
	 * @param isbn
	 */
	public void deleteModel(String email) {
		dao.delete(email);
	}
	
	/**
	 * Delete Model
	 * 
	 * @param isbn
	 */
	public void deleteModel(UserModel model) {
		dao.delete(model);
	}

}
